package com.ucode.model.cgms.form;

import com.ucode.tool.base.enums.CommonSwitchStatusEnum;
import com.ucode.tool.validator.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 分类分类配置Form
 * @Author: liliang
 * @Date: 2025/5/11 14:22
 * @Version: 1.0
 */
@Schema(description = "陪玩俱乐部社区系统 - 分类分类配置Form")
@Data
@EqualsAndHashCode
@ToString(callSuper = true)
public class CgmsCompanionCategoryForm {
    /**
     * 分类名称
     */
    @Schema(description = "分类名称", example = "王者荣耀", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "分类名称不能为空")
    @Size(max = 50, message = "分类名称不能超过50个字符")
    private String name;
    /**
     * 分类图标
     */
    @Schema(description = "图标", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "图标不能为空")
    @Size(max = 255, message = "图标不能超过 255 个字符")
    private String icon;
    /**
     * 专区编号
     */
    @Schema(description = "专区编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "专区编号不能为空")
    private Long zoneId;
    /**
     * 状态
     */
    @Schema(description = "状态，参考枚举CommonSwitchStatusEnum", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "状态不能为空")
    @InEnum(value= CommonSwitchStatusEnum.class)
    private Integer status;
    /**
     * 描述
     */
    @Schema(description = "描述", requiredMode = Schema.RequiredMode.AUTO)
    @Size(max = 500, message = "描述不能超过 500 个字符")
    private String description;

    /**
     * 排序
     */
    private Integer sortnum;

}
